<div class="ibox-content clearfix" style="padding:0px;border: none;height: 100%;">
	<div id="container" tabindex="0"></div>
</div>
<link href="__PUBLIC__/css/litebox.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/js/litebox.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/images-loaded.min.js" type="text/javascript"></script>
<script type="text/javascript">
	var map = new AMap.Map('container',{
        resizeEnable: true,
        zoom: 13,
        center: [{$center_sign[0]}, {$center_sign[1]}]
    });

    var lnglats = [{$lnglats_array}];
    var user_img = [{$user_img}];
    var sign_title = [{$sign_title}];
    var sign_content = [{$sign_content}];

    var infoWindow = new AMap.InfoWindow({offset: new AMap.Pixel(0, -30)});
    for (var i = 0, marker; i < lnglats.length; i++) {
        var marker = new AMap.Marker({
        	topWhenMouseOver:true,
        	topWhenClick:true,
            position: lnglats[i],
            map: map,
            icon : user_img[i],//24px*24px
            animation:'AMAP_ANIMATION_DROP', //AMAP_ANIMATION_BOUNCE //AMAP_ANIMATION_DROP
            shadow : user_img[i],//24px*24px
            clickable:true,
            title: sign_title[i],
            extData: sign_content[i]
        });
        marker.on('click', markerClick);
        marker.emit('click', {target: marker});
    }

    function markerClick(e) {
        //实例化信息窗体
		var title='<div style="width:60px;height: 60px;float:left;padding:0px;margin-top: 5px;"><img style="float:left;width:50px;height:50px;border-radius:50px;position:inherit;" src="'+e.target.getIcon()+'" /></div>'+e.target.getTitle()+'</br>',
		content=[];
		content.push(e.target.getExtData());
		var infoWindow = new AMap.InfoWindow({
		    isCustom: true,  //使用自定义窗体
		    content: createInfoWindow(title,content.join("<br>")),
		    offset: new AMap.Pixel(16, -50)//-113, -140
		});
		infoWindow.open(map, e.target.getPosition());

        //鼠标点击marker弹出自定义的信息窗体
        AMap.event.addListener(marker, 'click', function() {
            infoWindow.open(map, e.target.getPosition());
        });
    }

    $('.litebox').liteBox({
      revealSpeed: 400,
      background: 'rgba(0,0,0,.8)',
      overlayClose: true,
      escKey: true,
      navKey: true,
      errorMessage: '图片加载失败.'
    });

 </script>